package com.zdp.provider.service;

import com.zdp.provider.controller.CourseDto;
import com.zdp.provider.controller.TeacherVo;
import com.zdp.provider.mapper.TeacherMapper;
import com.zdp.provider.pojo.TeacherDo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 类描述: 教师信息提供服务
 *
 * @author ZhhengDP
 * @since 2021/8/16
 */
@Service
public class TeacherService {

    private TeacherMapper teacherMapper;
    @Autowired
    public TeacherService(TeacherMapper teacherMapper){
        this.teacherMapper = teacherMapper;
    }

    public TeacherVo getTeacherById(Integer teacherId){
        TeacherDo teacherDo = teacherMapper.selectByPrimaryKey(teacherId);
        TeacherVo result = new TeacherVo();
        if(teacherDo != null){
            result = new TeacherVo(teacherDo);
        }
        return result;
    }
}
